package com.bjc2.decorator;

public class Client {
    public static void main(String[] args) {
        //点一份炒饭
        FastFood food = new FriedRice();
        System.out.println(food.getDesc()+"  "+food.cost()+"元");

        System.out.println("=================================");
        //在炒饭中加个鸡蛋
        food = new Egg(food);
        System.out.println(food.getDesc()+"  "+food.cost()+"元");

        System.out.println("=================================");
        food = new Bacon(food);
        System.out.println(food.getDesc()+"  "+food.cost()+"元");
    }
}
